package consultan.vanke.com.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;

import org.greenrobot.eventbus.EventBus;

import butterknife.BindView;
import consultan.vanke.com.R;
import consultan.vanke.com.bean.HomeJumpBean;
import consultan.vanke.com.constant.ConstantLibrary;
import consultan.vanke.com.event.MessageEvent;

public class DdFragment extends BaseFragment {

    @BindView(R.id.linear_all)
    LinearLayout linearAll;

    @Override
    protected void initViews() {

    }

    @Override
    protected void initDatas() {
        View basemessage = View.inflate(_mActivity, R.layout.linear_item1, null);
        View basemessage1 = View.inflate(_mActivity, R.layout.linear_item2, null);
        linearAll.addView(basemessage);
        linearAll.addView(basemessage1);
        basemessage.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                //詳情
                MessageEvent<HomeJumpBean> messageEvent = new MessageEvent<>();
                messageEvent.setData(new HomeJumpBean(ConstantLibrary.jiudiandetailfragment, ConstantLibrary.TYPE_TIME_OUT));
                EventBus.getDefault().post(messageEvent);
            }
        });
        basemessage1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                MessageEvent<HomeJumpBean> messageEvent = new MessageEvent<>();
                messageEvent.setData(new HomeJumpBean(ConstantLibrary.shangchengdetailfragment, ConstantLibrary.TYPE_TIME_OUT));
                EventBus.getDefault().post(messageEvent);
            }
        });
    }

    @Override
    protected void initEvents() {
    }

    @Override
    protected View initContentView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        return View.inflate(_mActivity, R.layout.dd_fragment, null);
    }

}
